import {requsetHttpSearch} from '@/api'
//search   搜索   小仓库
const state={
    SearchList:{}
}
const actions={
    async getSearchList({commit},params={}){
        let result=await requsetHttpSearch(params)

        if(result.code===200){
            commit('GETSEARCHLIST',result.data)
        }
    }
}
const mutations={
    GETSEARCHLIST(state,SearchList){
        state.SearchList=SearchList
    }
}
const getters={
    goodsList(state){
        return state.SearchList.goodsList || []
    },
    trademarkList(state){
        return state.SearchList.trademarkList || []
    },
    attrsList(state){
        return state.SearchList.attrsList || []
    }
}

export default {
    state,
    actions,
    mutations,
    getters
}